package lk.icta.core.service;

import lk.icta.common.dto.WorkBenchItem;
import lk.icta.core.entity.LandApplication;
import lk.icta.core.entity.WorkflowItem;
import lk.icta.core.entity.WorkflowTask;
import lk.icta.user.entity.User;

import java.util.EnumSet;
import java.util.List;

/**
 * @author Mahesha Kalpanie
 */
public interface WorkflowService {

    public List<WorkBenchItem> loadWorkBench(User user);

    public List<LandApplication> getApplicationsByState(User user, WorkflowTask state);

    public List<LandApplication> getApplicationsByStateSet(User user, EnumSet<WorkflowTask> stateSet);

    //public List<LandApplication> loadAppList(User user, String workflowAction);
    public List<LandApplication> loadAppList(User user, WorkflowTask workflowAction);

    public List<LandApplication> loadAppListUseAlienationMethod(User user, WorkflowTask workflowAction, int alienationMethodId);

    public List<LandApplication> loadRejectedAppList(User user);

    public List<LandApplication> loadAppListBeforeAlienation(User user, int mode);

    public List<LandApplication> loadApprovedDetailedAppList(User user);

    public List<LandApplication> loadFinalizedAppList(User user, int mode);

    public WorkflowItem getWorkflowItemById(int id);

    public WorkflowItem getWorkflowStartItemById();

    //public WorkflowItem getStartItemOfWorkflow(int alienationMethodId);

    public WorkflowItem getNextWorkflowItemByTask(WorkflowTask workflowTask, String nextItemList);

    public WorkflowItem getNextWorkflowItem(WorkflowTask workflowTask, int currentItemId, User user);

    public WorkflowItem getNextWorkflowItemByUserRole(int currentItemId, User user);
}
